/*
 * @Description: 
 * @Date: 2022-02-17 16:53:08
 * @Author: caikaixuan
 * @LastEditTime: 2022-02-18 16:07:50
 */
const Koa = require("koa");
const Router = require("koa-router");
const logger = require("koa-logger");
const bodyParser = require("koa-bodyparser");
const controller = require('./controllers/setup');
const rest = require('./rest');
const model = require('./models/sync')

const app = new Koa();
app
  .use(logger())
  .use(bodyParser())
  .use(rest.restify())
  .use(controller())
model.sync()

const port = process.env.PORT || 80;
app.listen(port, () => {
  console.log("启动成功", port);
});

